#include "five.h"
#include "ui_five.h"
#include<QPainter>
FIVE::FIVE(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::FIVE)
{
    ui->setupUi(this);
    this->setGeometry(QRect(600,200,600,600));
}

FIVE::~FIVE()
{
    delete ui;
}
void FIVE::paintEvent(QPaintEvent *event){
    QPainter painter(this);//画游戏背景。
    painter.setPen(Qt::black);//画笔颜色
    painter.setBrush(Qt::gray);//画刷颜色
    painter.drawRect(20,20,560,560);//画矩形
    painter.setPen(Qt::black);
    for(int i=1;i<=14;i++)
    {
        painter.drawLine(20,(i*40+20),580,(i*40+20));
        painter.drawLine((i*40+20),20,(i*40+20),580);
    }//for循环实现画线
}

